When writing bushnell_trl files, use output filename.
authorrobertl <robertl>
Mon, 18 Jan 2010 02:37:06 +0000 (02:37 +0000)
committerrobertl <robertl>
Mon, 18 Jan 2010 02:37:06 +0000 (02:37 +0000)
bushnell.c
bushnell_trl.c
xmldoc/formats/bushnell.xml
xmldoc/formats/bushnell_trl.xml

index 513edf3a107a21f0e1f9e31aa5a91a5a48d74193..e05ecd87a129e06ce60d13e6bd7db2f97ba4af84 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Read and write Bushnellfiles.
+    Read and write Bushnell files.
 
     Copyright (C) 2008, 2009  Robert Lipe (robertlipe@gpsbabel.org)
 
index e7d85a720e5750df4824e469b294e85665392db2..5f322e602a3c8e990ff7e008863a528eacde4952 100644 (file)
@@ -52,9 +52,18 @@ rd_deinit(void) {
 
 static void
 wr_init(const char *fname) {
+  int i,l = strlen(fname);
+  char obuf[20] = { 0 } ; 
+  char *p = obuf;
   file_out = gbfopen_le(fname, "w", MYNAME);
   trkpt_count = 0;
-  static char obuf[20] = {"TL003"};
+  for (i = 0; (i < l) && (i < 20); i++) {
+    char c = toupper(fname[i]);
+    if (isalnum(c))
+      *p++ = c;
+    if (c == '.')
+      break;
+  }
   gbfwrite(&obuf, 1, 20, file_out);
 }
 
index ad46192c4a028585d8ea3921cfa113bf93d14ba6..6dd55172beb2addc5ba5f27d4a0b118ab123209f 100644 (file)
@@ -8,16 +8,31 @@ It's an oddity for many GPSBabel norms that this format requires each
 waypoint be in a separate file.   Our "output filename" argument, -F is 
 modified to take an "output filename template".   The output filename
 you specify will have a dash, and a sequentially increasing integer,
-and the ".wpt" extension appended to it.
+and the ".wpt" extension appended to it.  When the names are shown on
+the GPS itself, the shortnames from the source format are used and not these
+"made up" names.
 </para>
 <example id="bushnell-output">
 <title>Command showing writing to Bushnell files</title>
 <para>
 Consider the case where 'whatever.gpx' holds three waypoints.
 <userinput>
-  gpsbabel -i gpx -f whatever.gpx -o bushnell -F /Volumes/Bushnell/whatever
+  gpsbabel -i gpx -f whatever.gpx -o bushnell -F /Volumes/Bushnell/WAYPOINT/whatever
 </userinput>
 will result in "whatever-0.wpt", "whatever-1.wpt", and "whatever-2.wpt" being
 credated in that directory.
+Windows users may prefer the spelling:
+<userinput>
+  gpsbabel -i gpx -f whatever.gpx -o bushnell -F e:/WAYPOINT/whatever
+</userinput>
+</para>
+
+<para>
+At least for the 200CR, the directory name used by the device is "WAYPOINT"
+in the root directory.  It's also worth mentioning that its USB Mass Storage
+protocol appears to not work on (at least) Snow Leopard 10.6.2.  It's not 
+known if other Onix models have a more compatible USB implementation.
 </para>
+
+
 </example>
index 0a17cac7e5ac47f5e61586482c5deeb30bd7d8e8..a4ed29afe45765b03c034882d25a38f8f6db1655 100644 (file)
@@ -5,7 +5,8 @@ receivers, notably the <productname>Onix 400</productname>.
 </para>
 <para>
 This format reads individual .trl files as written by the GPS.  As this is
-a reverse-engineered format, it's not understood how long tracks, in 
+a reverse-engineered format, it's not understood how (or even if) long 
+tracks, in 
 particular, span multiple files so initially this format is most effective
 on tracks under a few thousand points.
 </para>
@@ -13,3 +14,8 @@ on tracks under a few thousand points.
   When writing tracks, a maximum of 4502 points is supported as this is the
   most we believe these units can represent in a track.
 </para>
+<para>
+  The output base filename, converted to uppercase and stripped of 
+  everything but letters and digits, is used for the trail name inside 
+  the file itself.
+</para>